<!DOCTYPE html>
<html lang="{{=T.accepted_language or 'en'}}" class="no-js"><!-- no-js need it for modernzr -->
    <head>

        <meta charset="utf-8" />        

        <title>{{=response.title or request.application}}</title>

        <meta name="application-name" content="{{=request.application}}" /> 
        <meta name="google-site-verification" content="" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
        <link rel="shortcut icon" href="{{=URL('static','favicon.ico')}}" type="image/x-icon">
        <link rel="apple-touch-icon" href="{{=URL('static','favicon.png')}}">

        <script src="{{=URL('static','js/jquery.min.js')}}"></script>    
        <script src="{{=URL('static','js/jquery.tablesorter.min.js')}}"></script>    
        <script src="{{=URL('static','js/jquery.cycle.all.js')}}"></script>    
        <script src="{{=URL('static','js/modernizr-1.7.min.js')}}"></script>
        <script
            src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
        <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css"
        rel="stylesheet" type="text/css"/>
        <link rel="stylesheet/less" href="{{=URL('static','bootstrap/lib/bootstrap.less')}}" />
        <link rel="stylesheet/less" href="{{=URL('static','css/style.less')}}" />
        <script src="{{=URL('static','js/less-1.1.3.min.js')}}"></script>

        <script src="{{=URL('static','bootstrap/js/bootstrap-buttons.js')}}"></script>
        <script src="{{=URL('static','bootstrap/js/bootstrap-dropdown.js')}}"></script>
        <script src="{{=URL('static','bootstrap/js/bootstrap-tabs.js')}}"></script>
        <script src="{{=URL('static','js/script.js')}}"></script>
        <script>
            $(function() {
                $("a#blog").click(function() {
                    //todo: make this load the blog into the div with ajax
                    $("div#bodycontent").html($(this).attr('href'));
                    return false;
                });

            });
        </script>
    </head>
    <body>
        <div class="topbar" data-dropdown="dropdown">
            <div class="topbar-inner">
                <div class="container">
                    <h3><a href="{{=URL('default','index')}}">WIUX</a></h3>
                    <ul class="nav">
                        <li>
                        <a href="{{=URL('music','listen')}}">Listen Live</a>
                        </li>
                        <li>
                        <a href="{{=URL('schedule','index')}}">Schedule</a>
                        </li>
                        <li>
                        <a id="blog" href="http://www.wiux.org/blog" target="_blank">Blog</a>
                        </li>
                        <li>
                        <a href="{{=URL('events','index')}}">Events</a>
                        </li>
                        <li class="dropdown">
                        <a href="#" class="dropdown-toggle">Services</a>
                        <ul class="dropdown-menu">
                            <li>
                            <a href="{{=URL('services','mobiledj')}}">Mobile DJ</a>
                            </li>
                            <li>
                            <a href="{{=URL('services','underwriting')}}">Underwriting</a>
                            </li>
                        </ul>
                        </li>
                        <li class="dropdown">
                        <a href="#" class="dropdown-toggle">About</a>
                        <ul class="dropdown-menu">
                            <li>
                            <a href="{{=URL('about','contact')}}">Contact</a>
                            </li>
                            <li>
                            <a href="{{=URL('about','history')}}">History</a>
                            </li>
                            <li>
                            <a href="{{=URL('about','directors')}}">Directors</a>
                            </li>
                            <li>
                            <a href="{{=URL('about','press')}}">In the Press</a>
                            </li>
                        </ul>
                        </li>
                    </ul>
                    <!-- TODO: check to see if there is a logged in user --!>
                    {{if session.username:}}
                    <ul class="nav secondary-nav">
                        <li class="dropdown">
                        <a href="#" class="dropdown-toggle">Menu</a>
                        <ul class="dropdown-menu">
                            <!-- TODO: check to see if logged in user is member --!>
                            <li>
                            <a href="{{=URL('member','profile')}}">Edit Profile</a>
                            </li>

                            <!--
                            <li>
                            <a href="{{=URL('member','apply')}}">Submit Application</a>
                            </li>
                            -->

                            <li class="divider"></li> 
                            <!-- TODO: check to see if logged in user is staff 
                            <li>
                            <a href="{{=URL('committees','index')}}">Committees</a>
                            </li>-->

                            {{if session.usertype > 1:}}
                            <li>
                            <a href="{{=URL('staff','new_album')}}">Enter an Album</a>
                            </li>
                            <li>
                            <a href="{{=URL('reviews','index')}}">Review an Album</a>
                            </li>
                            {{pass}}

                            <li class="divider"></li> 
                            <!-- TODO: check to see if logged in user is DJ --!>
                            {{if session.usertype > 2:}}
                            <li>
                            <a href="{{=URL('music','search')}}">DJ Console</a>
                            </li>
                            {{pass}}
                        </ul>
                        </li>

                        <!-- TODO: check to see if logged in user is director --!>
                        {{if session.usertype > 3:}}
                        <li class="dropdown">
                        <a href="#" class="dropdown-toggle">Directors Only</a>
                        <ul class="dropdown-menu">
                            <li>
                            <a href="{{=URL('committees','admin')}}">Your Committee</a>
                            </li>
                            <li>
                            <a href="{{=URL('director','mailing_lists')}}">Mailing Lists</a>
                            </li>
                            <li class="divider"></li>
                            <li>
                            <a href="{{=URL('applications','admin')}}">Approve Applications</a>
                            </li>
                            <li>
                            <a href="{{=URL('reviews','admin')}}">Approve Albums</a>
                            </li>
                            <li>
                            <a href="{{=URL('events','add')}}">Add Events</a>
                            </li>
                            <li>
                            <a href="{{=URL('schedule','admin')}}">Edit DJ Schedule</a>
                            </li>
                        </ul>
                        </li>
                        {{pass}}
                    </ul>

                    <p class="pull-right"> Hello, {{=session.username}} |  <a
                        href="{{=URL('member','logout')}}">Logout</a></p>

                    <!-- if no logged in user, display this: -->
                    {{else:}}
                    <ul class="nav secondary-nav">                
                        <form 
                            action="{{=URL('member','login')}}" method="POST"> 
                            <input name="email" class="input-small" type="text"
                            placeholder="Email">
                            <input name="password" class="input-small"
                            type="password"
                            placeholder="Password">
                            <input class="" type="submit" value="Login"/>
                        </form>
                        <li>
                        <a href="{{=URL('member','login')}}">Login</a>
                        </li>
                        <li>
                        <a href="{{=URL('member','register')}}">Register</a>
                        </li>
                    </ul>

                    {{pass}}
                </div>
            </div>
        </div>

        <!-- BEGIN INDIANA UNIVERSITY BLOOMINGTON BRANDING BAR
        <div id="identity">
            <div id="signature">
                <a href="http://www.iub.edu/" target="_blank" class="iub">
                    <img src="/radio/static/images/iub_crimson.gif" alt="Indiana University Bloomington" 
                    width="171" height="44" />
                </a>
            </div>
        </div>
        END INDIANA UNIVERSITY BLOOMINGTON BRANDING BAR -->

        <div id="bodycontent" class="container-fluid">
            {{if globals().get("left_sidebar_enabled", True):}}
            <div class="sidebar">
                <a href="/radio/default/index">
                    <img id="logo" src="{{=URL('static','images/logo.jpg')}}" />
                </a>
                <div id="sidebar" class="well">
                    <h5>important information</h5>
                    very very vrey important that you see this on the side of
                    the bar the left_sidebar 
                    <hr>
                    this is text.lots oftext
                    current DJ, Song, Album, Artist playing 
                    <hr>
                    <ul>
                        <li> and this is a list</li>
                        <li> of things </li>
                        <li> that could be important</li>
                    </ul>
                </div>
                <div id="advertisement" class="well">
                    this could be an advert
                </div>
            </div>
            {{pass}}
            <div class="content">
                <div class="page-header">
                    <h1>{{=" ".join(request.controller.split("_"))}} 
                        <small>{{=" ".join(request.function.split("_"))}}</small></h1>
                </div>
                {{include}} 

                <footer>
                {{block footer}} <!-- this is default footer -->
                {{=T('Copyright')}} &#169; 2011               
                {{end}}
                </footer>
            </div>
        </div>
        <!--[if lt IE 7 ]>
        <script src="{{=URL('static','js/dd_belatedpng.js')}}"></script>
        <script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
        <![endif]-->
        {{if response.google_analytics_id:}}<script>/* http://mathiasbynens.be/notes/async-analytics-snippet */ var _gaq=[['_setAccount','{{=response.google_analyitics_id}}'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script')) </script>{{pass}}
    </body>
</html>
